/**
 ******************************************************************************
 * @file           : bsp_ds18b20_config.h
 * @brief          : DS18B20 Configuration File (STM32F4xx)
 ******************************************************************************
 */

#ifndef __BSP_DS18B20_CONFIG_H
#define __BSP_DS18B20_CONFIG_H

#ifdef __cplusplus
extern "C" {
#endif

#include "stm32f4xx.h"

#define DS18B20_USE_LOG     1

#if (DS18B20_USE_LOG == 1)
    #ifndef LOG_TAG
        #define LOG_TAG    "DS18B20"
    #endif
    #include "elog.h"
#elif (DS18B20_USE_LOG == 2)
    #include <stdio.h>
    #define log_i(fmt, ...)     printf(fmt "\r\n", ##__VA_ARGS__)
    #define log_w(fmt, ...)     printf("[WARN] " fmt "\r\n", ##__VA_ARGS__)
    #define log_e(fmt, ...)     printf("[ERROR] " fmt "\r\n", ##__VA_ARGS__)
    #define log_d(fmt, ...)     printf("[DEBUG] " fmt "\r\n", ##__VA_ARGS__)
#else
    #define log_i(fmt, ...)
    #define log_w(fmt, ...)
    #define log_e(fmt, ...)
    #define log_d(fmt, ...)
#endif

#define DS18B20_GPIO_PORT       GPIOA
#define DS18B20_GPIO_PIN        GPIO_PIN_0

#ifdef __cplusplus
}
#endif

#endif /* __BSP_DS18B20_CONFIG_H */
